<?xml version="1.0" encoding="utf-8"?>
<openerp>
	<data>
        <!-- Searching Product Product -->
        <record id="searching_product_normal_form_view_bf" model="ir.ui.view">
            <field name="name">searching.product.product.form.bf</field>
            <field name="model">product.product</field>
            <field name="inherit_id" ref="applico_v8.searching_product_normal_form_view"/>
            <field name="arch" type="xml">
				<field name="standard_price" position="replace">
					<field name="standard_price" attrs="{'invisible': [('type','=','service')], 'readonly':['&amp;', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}"/>
					<field name="srvc_cost_price" attrs="{'invisible': [('type','!=','service')]}"/>
				</field>
            </field>
        </record>
        
		<record id="product_normal_form_view_bf" model="ir.ui.view">
            <field name="name">product.product.form.bf</field>
            <field name="model">product.product</field>
            <field eval="6" name="priority"/>
            <field name="inherit_id" ref="product.product_normal_form_view"/>
            <field name="arch" type="xml">
				<field name="standard_price" attrs="{'readonly':['&amp;', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" nolabel="1" position="replace">
					<field name="standard_price" attrs="{'invisible': [('type','=','service')], 'readonly':['&amp;', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}"/>
					<field name="srvc_cost_price" attrs="{'invisible': [('type','!=','service')]}"/>
				</field>
				<field name="default_code" position="replace">
					<field name="default_code" required="1"/>
				</field>
            </field>
        </record>

		<record id="product_template_only_form_view_bft" model="ir.ui.view">
            <field name="name">product.template.product.form.bft</field>
            <field name="model">product.template</field>
            <field name="mode">primary</field>
            <field name="priority" eval="7" />
            <field name="inherit_id" ref="product.product_template_only_form_view"/>
            <field name="arch" type="xml">
            	<field name="default_code" position="replace">
                	<field name="default_code" attrs="{'invisible': [('product_variant_count', '>', 1)]}" required="1"/>
                </field>
            </field>
        </record>
	</data>
</openerp>
